package com.qinggeng.project.api.dto;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.google.common.collect.Lists;
import lombok.Data;

import java.util.List;

@Data
public class DateDto {

    //日期
    private String dayTime;

    //日期名称（今天，明天，后天）
    private String dayName;

    //时间段列表
    private List<TimeDto> timeList;

    @JsonIgnore
    private Integer index;


    public String getDayTime() {
        return dayTime;
    }

    public void setDayTime(String dayTime) {
        this.dayTime = dayTime;
    }

    public String getDayName() {
        return dayName;
    }

    public void setDayName(String dayName) {
        this.dayName = dayName;
    }

    public Integer getIndex() {
        return index;
    }

    public void setIndex(Integer index) {
        this.index = index;
    }

    public void setTimeList(List<TimeDto> timeList) {
        this.timeList = timeList;
    }

    public List<TimeDto> getTimeList() {
        if (timeList == null){
            timeList = Lists.newArrayList();
        }
        return timeList;
    }
}
